package com.yueman.ptoolopenticket.ticket.utils.lixin;




/**
 * Created by syf0405 on 2019/4/12.
 */
public class QztRsaUtil {

    //base64ed base64_privateKey
    private static final String base64_privateKey ="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKtSbeUzEW0VrIh3UgQnh2EnDNb/0Y0pvnI86GCp8w/tlodHQJNY5nr4jFCgsQ7MA8p/4nWeoZA/x4qzaaApUfARlkU5n7iIztZA5b8bgghiVpZuffaOec5JCuY0m18891llby/KQwpuFP22v0LCsAfQwSv1fPRLr4XnOaZa1YK9AgMBAAECgYBmeJwwrhXrOD6FNVFCGN6ZloDQjByroV8+9v1K6/vs9//EFDMkrtTUkptikmq03gQad9lc3q/mFq/kXyF7YZuWzxVCl3QgM6YxI4sQoPHWSgXQzBhfxmIUtPUILcUoFovAEQ9xxwCvUAJzYv6/SViD7Urfgz089J3JLuNG6Y2rBQJBAOigsLAPUGYOBLiG7pPeFxbFAvbTzIrpJUw7Zy0xQE8bAytM9FoWlKIUgwGKS8N76Kim3Y76ce/HjFJiZzXZkT8CQQC8iOxaIgTvSBQuV53U0xs3mMsx9eiwKVRciKtFDm36yUGkr8MB+GUMJGcNxsTnu7fustIgIRTvz3WucD6Y1HEDAkBEYA7vAOFRzecHUenIHqxMrgWsBR8G6XZkDMXL28EaP0dUL99Wp3JynXLQPhT81WvSPpG619QrdUzCXlgV1OhDAkBQUcTfYT7Y8cwnMgx7brRZqy5lym2nHvRht5e/g7Y28SaWEorxe/EQizGcHOImF0L03hnGtlFFGQz5k7gXQ+ohAkEAywuALwpeKbKsthIX6VlahBbf/imqaJhbfgzyQD+Exu/exRfe+jO4nb54UeGnMGB9H7QglcoUDKm+04mdTTCQ8A==";

    //base64ed base64_publicKey
    private static final String base64_publicKey ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrUm3lMxFtFayId1IEJ4dhJwzW/9GNKb5yPOhgqfMP7ZaHR0CTWOZ6+IxQoLEOzAPKf+J1nqGQP8eKs2mgKVHwEZZFOZ+4iM7WQOW/G4IIYlaWbn32jnnOSQrmNJtfPPdZZW8vykMKbhT9tr9CwrAH0MEr9Xz0S6+F5zmmWtWCvQIDAQAB";


    public static byte[] encrypt(String source) throws Exception {
        return RsaUtil.encrypt(source,base64_privateKey);
    }

    public static String decrypt(byte[] source) throws Exception {
        return RsaUtil.decrypt(source,base64_publicKey);
    }

}
